package org.stu.tp.dao;

import java.util.List;

import org.hibernate.Session;
import org.stu.tp.dto.Team;

import org.stu.tp.util.HibernateUtil;

public class TeamDao {
	@SuppressWarnings("unchecked")
	public static Team getTeam(String recordName){
		Team team=new Team();
		Session session = HibernateUtil.currentSession();
		List <Team> teamList=session.createSQLQuery("select * from team where RecordName="+"'"+recordName+"'").addEntity(Team.class).list();
		team=teamList.get(0);
		HibernateUtil.closeSession();
		return team;
	}
}
